package com.bdqn;


import com.bdqn.dao.UserDao;
import com.bdqn.pojo.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    @Resource
    private UserDao userDao;
    //无参构造
    public UserServiceImpl(){}
    //用于为dao属性赋值的构造方法
    public UserServiceImpl(UserDao userDao){
        this.userDao=userDao;
    }
    @Override
    public void save(SysUser user) {
        userDao.save(user);
    }
    public void setUserDao(UserDao userDao){
        this.userDao=userDao;
    }
}
